3.12.31 \(\int \frac {(d+e x^2)^2 (a+b \text {ArcTan}(c x))}{x^3} \, dx\) [1131]

Optimal. Leaf size=128 \[ -\frac {b c d^2}{2 x}-\frac {b e^2 x}{2 c}-\frac {1}{2} b c^2 d^2 \text {ArcTan}(c x)+\frac {b e^2 \text {ArcTan}(c x)}{2 c^2}-\frac {d^2 (a+b \text {ArcTan}(c x))}{2 x^2}+\frac {1}{2} e^2 x^2 (a+b \text {ArcTan}(c x))+2 a d e \log (x)+i b d e \text {PolyLog}(2,-i c x)-i b d e \text {PolyLog}(2,i c x) \]

[Out]

-1/2*b*c*d^2/x-1/2*b*e^2*x/c-1/2*b*c^2*d^2*arctan(c*x)+1/2*b*e^2*arctan(c*x)/c^2-1/2*d^2*(a+b*arctan(c*x))/x^2
+1/2*e^2*x^2*(a+b*arctan(c*x))+2*a*d*e*ln(x)+I*b*d*e*polylog(2,-I*c*x)-I*b*d*e*polylog(2,I*c*x)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5100, 4946, 331, 209, 4940, 2438, 327} \begin {gather*} -\frac {d^2 (a+b \text {ArcTan}(c x))}{2 x^2}+\frac {1}{2} e^2 x^2 (a+b \text {ArcTan}(c x))+2 a d e \log (x)-\frac {1}{2} b c^2 d^2 \text {ArcTan}(c x)+\frac {b e^2 \text {ArcTan}(c x)}{2 c^2}-\frac {b c d^2}{2 x}+i b d e \text {Li}_2(-i c x)-i b d e \text {Li}_2(i c x)-\frac {b e^2 x}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)^2*(a + b*ArcTan[c*x]))/x^3,x]

[Out]

-1/2*(b*c*d^2)/x - (b*e^2*x)/(2*c) - (b*c^2*d^2*ArcTan[c*x])/2 + (b*e^2*ArcTan[c*x])/(2*c^2) - (d^2*(a + b*Arc
Tan[c*x]))/(2*x^2) + (e^2*x^2*(a + b*ArcTan[c*x]))/2 + 2*a*d*e*Log[x] + I*b*d*e*PolyLog[2, (-I)*c*x] - I*b*d*e
*PolyLog[2, I*c*x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5100

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rubi steps

\begin {align*} \int \frac {\left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right )}{x^3} \, dx &=\int \left (\frac {d^2 \left (a+b \tan ^{-1}(c x)\right )}{x^3}+\frac {2 d e \left (a+b \tan ^{-1}(c x)\right )}{x}+e^2 x \left (a+b \tan ^{-1}(c x)\right )\right ) \, dx\\ &=d^2 \int \frac {a+b \tan ^{-1}(c x)}{x^3} \, dx+(2 d e) \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx+e^2 \int x \left (a+b \tan ^{-1}(c x)\right ) \, dx\\ &=-\frac {d^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+\frac {1}{2} e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+2 a d e \log (x)+\frac {1}{2} \left (b c d^2\right ) \int \frac {1}{x^2 \left (1+c^2 x^2\right )} \, dx+(i b d e) \int \frac {\log (1-i c x)}{x} \, dx-(i b d e) \int \frac {\log (1+i c x)}{x} \, dx-\frac {1}{2} \left (b c e^2\right ) \int \frac {x^2}{1+c^2 x^2} \, dx\\ &=-\frac {b c d^2}{2 x}-\frac {b e^2 x}{2 c}-\frac {d^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+\frac {1}{2} e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+2 a d e \log (x)+i b d e \text {Li}_2(-i c x)-i b d e \text {Li}_2(i c x)-\frac {1}{2} \left (b c^3 d^2\right ) \int \frac {1}{1+c^2 x^2} \, dx+\frac {\left (b e^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{2 c}\\ &=-\frac {b c d^2}{2 x}-\frac {b e^2 x}{2 c}-\frac {1}{2} b c^2 d^2 \tan ^{-1}(c x)+\frac {b e^2 \tan ^{-1}(c x)}{2 c^2}-\frac {d^2 \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+\frac {1}{2} e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )+2 a d e \log (x)+i b d e \text {Li}_2(-i c x)-i b d e \text {Li}_2(i c x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 114, normalized size = 0.89 \begin {gather*} \frac {1}{2} \left (-\frac {a d^2}{x^2}+a e^2 x^2-\frac {b d^2 \text {ArcTan}(c x)}{x^2}-\frac {b c d^2 (1+c x \text {ArcTan}(c x))}{x}+\frac {b e^2 \left (-c x+\left (1+c^2 x^2\right ) \text {ArcTan}(c x)\right )}{c^2}+4 a d e \log (x)+2 i b d e (\text {PolyLog}(2,-i c x)-\text {PolyLog}(2,i c x))\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)^2*(a + b*ArcTan[c*x]))/x^3,x]

[Out]

(-((a*d^2)/x^2) + a*e^2*x^2 - (b*d^2*ArcTan[c*x])/x^2 - (b*c*d^2*(1 + c*x*ArcTan[c*x]))/x + (b*e^2*(-(c*x) + (
1 + c^2*x^2)*ArcTan[c*x]))/c^2 + 4*a*d*e*Log[x] + (2*I)*b*d*e*(PolyLog[2, (-I)*c*x] - PolyLog[2, I*c*x]))/2

________________________________________________________________________________________

Maple [A]
time = 0.17, size = 211, normalized size = 1.65

method result size
derivativedivides \(c^{2} \left (\frac {a \,e^{2} x^{2}}{2 c^{2}}-\frac {a \,d^{2}}{2 c^{2} x^{2}}+\frac {2 a d e \ln \left (c x \right )}{c^{2}}+\frac {b \arctan \left (c x \right ) e^{2} x^{2}}{2 c^{2}}-\frac {b \arctan \left (c x \right ) d^{2}}{2 c^{2} x^{2}}+\frac {2 b \arctan \left (c x \right ) d e \ln \left (c x \right )}{c^{2}}-\frac {b \,e^{2} x}{2 c^{3}}-\frac {b \,d^{2} \arctan \left (c x \right )}{2}+\frac {b \,e^{2} \arctan \left (c x \right )}{2 c^{4}}-\frac {b \,d^{2}}{2 c x}+\frac {i b d e \ln \left (c x \right ) \ln \left (i c x +1\right )}{c^{2}}-\frac {i b d e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{c^{2}}+\frac {i b d e \dilog \left (i c x +1\right )}{c^{2}}-\frac {i b d e \dilog \left (-i c x +1\right )}{c^{2}}\right )\) \(211\)
default \(c^{2} \left (\frac {a \,e^{2} x^{2}}{2 c^{2}}-\frac {a \,d^{2}}{2 c^{2} x^{2}}+\frac {2 a d e \ln \left (c x \right )}{c^{2}}+\frac {b \arctan \left (c x \right ) e^{2} x^{2}}{2 c^{2}}-\frac {b \arctan \left (c x \right ) d^{2}}{2 c^{2} x^{2}}+\frac {2 b \arctan \left (c x \right ) d e \ln \left (c x \right )}{c^{2}}-\frac {b \,e^{2} x}{2 c^{3}}-\frac {b \,d^{2} \arctan \left (c x \right )}{2}+\frac {b \,e^{2} \arctan \left (c x \right )}{2 c^{4}}-\frac {b \,d^{2}}{2 c x}+\frac {i b d e \ln \left (c x \right ) \ln \left (i c x +1\right )}{c^{2}}-\frac {i b d e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{c^{2}}+\frac {i b d e \dilog \left (i c x +1\right )}{c^{2}}-\frac {i b d e \dilog \left (-i c x +1\right )}{c^{2}}\right )\) \(211\)
risch \(\frac {i b \ln \left (-i c x +1\right ) e^{2} x^{2}}{4}+\frac {b \,e^{2} \arctan \left (c x \right )}{2 c^{2}}+\frac {i b \,d^{2} \ln \left (i c x +1\right )}{4 x^{2}}+i b d e \dilog \left (i c x +1\right )-\frac {b \,c^{2} d^{2} \arctan \left (c x \right )}{2}-\frac {b \,e^{2} x}{2 c}-i b d e \dilog \left (-i c x +1\right )-\frac {i b \,c^{2} d^{2} \ln \left (i c x \right )}{4}-\frac {b c \,d^{2}}{2 x}-\frac {i b \,d^{2} \ln \left (-i c x +1\right )}{4 x^{2}}+\frac {i c^{2} b \,d^{2} \ln \left (-i c x \right )}{4}-\frac {i b \,e^{2} \ln \left (i c x +1\right ) x^{2}}{4}+\frac {a \,x^{2} e^{2}}{2}+\frac {a \,e^{2}}{2 c^{2}}-\frac {a \,d^{2}}{2 x^{2}}+2 a d e \ln \left (-i c x \right )\) \(218\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)^2*(a+b*arctan(c*x))/x^3,x,method=_RETURNVERBOSE)

[Out]

c^2*(1/2*a/c^2*e^2*x^2-1/2*a*d^2/c^2/x^2+2*a/c^2*d*e*ln(c*x)+1/2*b/c^2*arctan(c*x)*e^2*x^2-1/2*b*arctan(c*x)*d
^2/c^2/x^2+2*b/c^2*arctan(c*x)*d*e*ln(c*x)-1/2*b*e^2*x/c^3-1/2*b*d^2*arctan(c*x)+1/2*b*e^2*arctan(c*x)/c^4-1/2
*b*d^2/c/x+I*b/c^2*d*e*ln(c*x)*ln(1+I*c*x)-I*b/c^2*d*e*ln(c*x)*ln(1-I*c*x)+I*b/c^2*d*e*dilog(1+I*c*x)-I*b/c^2*
d*e*dilog(1-I*c*x))

________________________________________________________________________________________

Maxima [A]
time = 0.60, size = 154, normalized size = 1.20 \begin {gather*} -\frac {1}{2} \, {\left ({\left (c \arctan \left (c x\right ) + \frac {1}{x}\right )} c + \frac {\arctan \left (c x\right )}{x^{2}}\right )} b d^{2} + \frac {1}{2} \, a x^{2} e^{2} + 2 \, a d e \log \left (x\right ) - \frac {a d^{2}}{2 \, x^{2}} - \frac {\pi b c^{2} d e \log \left (c^{2} x^{2} + 1\right ) - 4 \, b c^{2} d \arctan \left (c x\right ) e \log \left (c x\right ) + 2 i \, b c^{2} d {\rm Li}_2\left (i \, c x + 1\right ) e - 2 i \, b c^{2} d {\rm Li}_2\left (-i \, c x + 1\right ) e + b c x e^{2} - {\left (b c^{2} x^{2} e^{2} + b e^{2}\right )} \arctan \left (c x\right )}{2 \, c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^3,x, algorithm="maxima")

[Out]

-1/2*((c*arctan(c*x) + 1/x)*c + arctan(c*x)/x^2)*b*d^2 + 1/2*a*x^2*e^2 + 2*a*d*e*log(x) - 1/2*a*d^2/x^2 - 1/2*
(pi*b*c^2*d*e*log(c^2*x^2 + 1) - 4*b*c^2*d*arctan(c*x)*e*log(c*x) + 2*I*b*c^2*d*dilog(I*c*x + 1)*e - 2*I*b*c^2
*d*dilog(-I*c*x + 1)*e + b*c*x*e^2 - (b*c^2*x^2*e^2 + b*e^2)*arctan(c*x))/c^2

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^3,x, algorithm="fricas")

[Out]

integral((a*x^4*e^2 + 2*a*d*x^2*e + a*d^2 + (b*x^4*e^2 + 2*b*d*x^2*e + b*d^2)*arctan(c*x))/x^3, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right ) \left (d + e x^{2}\right )^{2}}{x^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)**2*(a+b*atan(c*x))/x**3,x)

[Out]

Integral((a + b*atan(c*x))*(d + e*x**2)**2/x**3, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^3,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [B]
time = 0.68, size = 157, normalized size = 1.23 \begin {gather*} \left \{\begin {array}{cl} \frac {a\,\left (e^2\,x^4-d^2+4\,d\,e\,x^2\,\ln \left (x\right )\right )}{2\,x^2} & \text {\ if\ \ }c=0\\ \frac {a\,\left (e^2\,x^4-d^2+4\,d\,e\,x^2\,\ln \left (x\right )\right )}{2\,x^2}-b\,e^2\,\left (\frac {x}{2\,c}-\mathrm {atan}\left (c\,x\right )\,\left (\frac {1}{2\,c^2}+\frac {x^2}{2}\right )\right )-\frac {b\,d^2\,\left (c^3\,\mathrm {atan}\left (c\,x\right )+\frac {c^2}{x}\right )}{2\,c}-\frac {b\,d^2\,\mathrm {atan}\left (c\,x\right )}{2\,x^2}-b\,d\,e\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i} & \text {\ if\ \ }c\neq 0 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*atan(c*x))*(d + e*x^2)^2)/x^3,x)

[Out]

piecewise(c == 0, (a*(- d^2 + e^2*x^4 + 4*d*e*x^2*log(x)))/(2*x^2), c ~= 0, - b*e^2*(x/(2*c) - atan(c*x)*(1/(2
*c^2) + x^2/2)) + (a*(- d^2 + e^2*x^4 + 4*d*e*x^2*log(x)))/(2*x^2) - b*d*e*(dilog(- c*x*1i + 1) - dilog(c*x*1i
 + 1))*1i - (b*d^2*(c^3*atan(c*x) + c^2/x))/(2*c) - (b*d^2*atan(c*x))/(2*x^2))

________________________________________________________________________________________